﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Data.Linq.Mapping;
using System.ComponentModel;

namespace STS.Model
{
    [Table]
    public class BadaniaKrew : INotifyPropertyChanged, INotifyPropertyChanging
    {
        private int id;

        [Column(IsPrimaryKey = true, IsDbGenerated = true, DbType = "INT NOT NULL Identity", CanBeNull = false, AutoSync = AutoSync.OnInsert)]
        public int Id
        {
            get { return id; }
            set
            {
                if (id != value)
                {
                    NotifyPropertyChanging("Id");
                    id = value;
                    NotifyPropertyChanged("Id");
                }
            }
        }

        private int idKrew;

        [Column]
        public int IdKrew
        {
            get { return idKrew; }
            set
            {
                if (idKrew != value)
                {
                    NotifyPropertyChanging("IdKrew");
                    idKrew = value;
                    NotifyPropertyChanged("IdKrew");
                }
            }
        }

        private DateTime dataBadania;

        [Column]
        public DateTime DataBadania
        {
            get { return dataBadania; }
            set
            {
                if (dataBadania != value)
                {
                    NotifyPropertyChanging("DataBadania");
                    dataBadania = value;
                    NotifyPropertyChanged("DataBadania");
                }
            }
        }

        private double _WBC;

        [Column]
        public double WBC
        {
            get { return _WBC; }
            set
            {
                if (_WBC != value)
                {
                    NotifyPropertyChanging("WBC");
                    _WBC = value;
                    NotifyPropertyChanged("WBC");
                }
            }
        }

        private double _RBC;

        [Column]
        public double RBC
        {
            get { return _RBC; }
            set
            {
                if (_RBC != value)
                {
                    NotifyPropertyChanging("RBC");
                    _RBC = value;
                    NotifyPropertyChanged("RBC");
                }
            }
        }

        private double _Hemoglobina;

        [Column]
        public double Hemoglobina
        {
            get { return _Hemoglobina; }
            set
            {
                if (_Hemoglobina != value)
                {
                    NotifyPropertyChanging("Hemoglobina");
                    _Hemoglobina = value;
                    NotifyPropertyChanged("Hemoglobina");
                }
            }
        }

        private double _Hematokryt;

        [Column]
        public double Hematokryt
        {
            get { return _Hematokryt; }
            set
            {
                if (_Hematokryt != value)
                {
                    NotifyPropertyChanging("Hematokryt");
                    _Hematokryt = value;
                    NotifyPropertyChanged("Hematokryt");
                }
            }
        }

        private double _MCV;

        [Column]
        public double MCV
        {
            get { return _MCV; }
            set
            {
                if (_MCV != value)
                {
                    NotifyPropertyChanging("MCV");
                    _MCV = value;
                    NotifyPropertyChanged("MCV");
                }
            }
        }

        private double _MCH;

        [Column]
        public double MCH
        {
            get { return _MCH; }
            set
            {
                if (_MCH != value)
                {
                    NotifyPropertyChanging("MCH");
                    _MCH = value;
                    NotifyPropertyChanged("MCH");
                }
            }
        }

        private double _MCHC;

        [Column]
        public double MCHC
        {
            get { return _MCHC; }
            set
            {
                if (_MCHC != value)
                {
                    NotifyPropertyChanging("MCHC");
                    _MCHC = value;
                    NotifyPropertyChanged("MCHC");
                }
            }
        }

        private double _PlytkiKrwi;

        [Column]
        public double PlytkiKrwi
        {
            get { return _PlytkiKrwi; }
            set
            {
                if (_PlytkiKrwi != value)
                {
                    NotifyPropertyChanging("PlytkiKrwi");
                    _PlytkiKrwi = value;
                    NotifyPropertyChanged("PlytkiKrwi");
                }
            }
        }

        private double _RDW_SD;

        [Column]
        public double RDW_SD
        {
            get { return _RDW_SD; }
            set
            {
                if (_RDW_SD != value)
                {
                    NotifyPropertyChanging("RDW_SD");
                    _RDW_SD = value;
                    NotifyPropertyChanged("RDW_SD");
                }
            }
        }

        private double _RDW_CV;

        [Column]
        public double RDW_CV
        {
            get { return _RDW_CV; }
            set
            {
                if (_RDW_CV != value)
                {
                    NotifyPropertyChanging("RDW_CV");
                    _RDW_CV = value;
                    NotifyPropertyChanged("RDW_CV");
                }
            }
        }

        private double _PDW;

        [Column]
        public double PDW
        {
            get { return _PDW; }
            set
            {
                if (_PDW != value)
                {
                    NotifyPropertyChanging("PDW");
                    _PDW = value;
                    NotifyPropertyChanged("PDW");
                }
            }
        }

        private double _MPV;

        [Column]
        public double MPV
        {
            get { return _MPV; }
            set
            {
                if (_MPV != value)
                {
                    NotifyPropertyChanging("MPV");
                    _MPV = value;
                    NotifyPropertyChanged("MPV");
                }
            }
        }

        private double _P_LCR;

        [Column]
        public double P_LCR
        {
            get { return _P_LCR; }
            set
            {
                if (_P_LCR != value)
                {
                    NotifyPropertyChanging("P_LCR");
                    _P_LCR = value;
                    NotifyPropertyChanged("P_LCR");
                }
            }
        }

        private double _PCT;

        [Column]
        public double PCT
        {
            get { return _PCT; }
            set
            {
                if (_PCT != value)
                {
                    NotifyPropertyChanging("PCT");
                    _PCT = value;
                    NotifyPropertyChanged("PCT");
                }
            }
        }

        private double p_neutrocyty;

        [Column]
        public double P_neutrocyty
        {
            get { return p_neutrocyty; }
            set
            {
                if (p_neutrocyty != value)
                {
                    NotifyPropertyChanging("P_neutrocyty");
                    p_neutrocyty = value;
                    NotifyPropertyChanged("P_neutrocyty");
                }
            }
        }

        private double p_limfocyty;

        [Column]
        public double P_limfocyty
        {
            get { return p_limfocyty; }
            set
            {
                if (p_limfocyty != value)
                {
                    NotifyPropertyChanging("P_limfocyty");
                    p_limfocyty = value;
                    NotifyPropertyChanged("P_limfocyty");
                }
            }
        }

        private double p_monocyty;

        [Column]
        public double P_monocyty
        {
            get { return p_monocyty; }
            set
            {
                if (p_monocyty != value)
                {
                    NotifyPropertyChanging("P_monocyty");
                    p_monocyty = value;
                    NotifyPropertyChanged("P_monocyty");
                }
            }
        }

        private double p_eozynocyty;

        [Column]
        public double P_eozynocyty
        {
            get { return p_eozynocyty; }
            set
            {
                if (p_eozynocyty != value)
                {
                    NotifyPropertyChanging("P_eozynocyty");
                    p_eozynocyty = value;
                    NotifyPropertyChanged("P_eozynocyty");
                }
            }
        }

        private double p_bazocyty;

        [Column]
        public double P_bazocyty
        {
            get { return p_bazocyty; }
            set
            {
                if (p_bazocyty != value)
                {
                    NotifyPropertyChanging("P_bazocyty");
                    p_bazocyty = value;
                    NotifyPropertyChanged("P_bazocyty");
                }
            }
        }

        private double neurocyty;

        [Column]
        public double Neurocyty
        {
            get { return neurocyty; }
            set
            {
                if (neurocyty != value)
                {
                    NotifyPropertyChanging("Neurocyty");
                    neurocyty = value;
                    NotifyPropertyChanged("Neurocyty");
                }
            }
        }

        private double limfocyty;

        [Column]
        public double Limfocyty
        {
            get { return limfocyty; }
            set
            {
                if (limfocyty != value)
                {
                    NotifyPropertyChanging("Limfocyty");
                    limfocyty = value;
                    NotifyPropertyChanged("Limfocyty");
                }
            }
        }

        private double monocyty;

        [Column]
        public double Monocyty
        {
            get { return monocyty; }
            set
            {
                if (monocyty != value)
                {
                    NotifyPropertyChanging("Monocyty");
                    monocyty = value;
                    NotifyPropertyChanged("Monocyty");
                }
            }
        }

        private double eozynocyty;

        [Column]
        public double Eozynocyty
        {
            get { return eozynocyty; }
            set
            {
                if (eozynocyty != value)
                {
                    NotifyPropertyChanging("Eozynocyty");
                    eozynocyty = value;
                    NotifyPropertyChanged("Eozynocyty");
                }
            }
        }

        private double bazocyty;

        [Column]
        public double Bazocyty
        {
            get { return bazocyty; }
            set
            {
                if (bazocyty != value)
                {
                    NotifyPropertyChanging("Bazocyty");
                    bazocyty = value;
                    NotifyPropertyChanged("Bazocyty");
                }
            }
        }

        private double _NRBC;

        [Column]
        public double NRBC
        {
            get { return _NRBC; }
            set
            {
                if (_NRBC != value)
                {
                    NotifyPropertyChanging("NRBC");
                    _NRBC = value;
                    NotifyPropertyChanged("NRBC");
                }
            }
        }

        private double potas;

        [Column]
        public double Potas
        {
            get { return potas; }
            set
            {
                if (potas != value)
                {
                    NotifyPropertyChanging("Potas");
                    potas = value;
                    NotifyPropertyChanged("Potas");
                }
            }
        }

        private double kreatynina;

        [Column]
        public double Kreatynina
        {
            get { return kreatynina; }
            set
            {
                if (kreatynina != value)
                {
                    NotifyPropertyChanging("Kreatynina");
                    kreatynina = value;
                    NotifyPropertyChanged("Kreatynina");
                }
            }
        }

        private int idLekarza;

        [Column]
        public int IdLekarza
        {
            get { return idLekarza; }
            set
            {
                if (idLekarza != value)
                {
                    NotifyPropertyChanging("IdLekarza");
                    idLekarza = value;
                    NotifyPropertyChanged("IdLekarza");
                }
            }
        }

        private int idPacjenta;

        [Column]
        public int IdPacjenta
        {
            get { return idPacjenta; }
            set
            {
                if (idPacjenta != value)
                {
                    NotifyPropertyChanging("IdPacjenta");
                    idPacjenta = value;
                    NotifyPropertyChanged("IdPacjenta");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        public event PropertyChangingEventHandler PropertyChanging;

        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private void NotifyPropertyChanging(string propertyName)
        {
            if (PropertyChanging != null)
            {
                PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
            }
        }

        public override string ToString()
        {
            return String.Format("Id: {0} IdTypLekarza: {2}", Id, IdKrew);
        }
    }
}
